From d535ea243e5e92f51b0e099a6754d6bb9c82c36b Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 24 Mar 2005 17:26:29 +0000 Subject: [PATCH] bitkeeper revision 1.1159.272.10 (4242f845cpppoqILZOUsc9BDNxlTUA) Set a block timeout at least a jiffy ahead, to have same behaviour as native Linux. Signed-off-by: Keir Fraser --- linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c index 5d09ae6a0a..bf8e8f9d90 100644 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/time.c @@ -673,6 +673,7 @@ int set_timeout_timer(void) { u64 alarm = 0; int ret = 0; + unsigned long j; /* * This is safe against long blocking (since calculations are @@ -681,7 +682,10 @@ int set_timeout_timer(void) * would first get locked out. It is safe against normal * updates of jiffies since interrupts are off. */ - alarm = __jiffies_to_st(next_timer_interrupt()); + j = next_timer_interrupt(); + if (j < (jiffies + 1)) + j = jiffies + 1; + alarm = __jiffies_to_st(j); /* Failure is pretty bad, but we'd best soldier on. */ if ( HYPERVISOR_set_timer_op(alarm) != 0 ) -- 2.30.2